export default ({store, redirect, route}) => {
  // 全局路由前置守卫业务
  // store -> 状态树信息
  // params,query -> 做校验参数合理性
  if(route.path !== '/login' && !store.state.user.token) {
    redirect('/login?path='+route.fullPath)
  }
}
